<?php
function account_management_page () {      
    
    global $wpdb, $user_ID, $msg;
    $title = __('Account Management');
   
    $user = get_userdata($user_ID);
?>
    <div class="wrap" id="account_management">
        <?php screen_icon(); ?>
        <h2><?php echo esc_html($title); ?></h2>
    </div>
<?php 
} 
//create form user registation
function accm_Create_User($atts = array()){
    global $wpdb, $user_ID, $msg;
    $title = __('Account Management - Add New User');
       
    $atts = shortcode_atts( array( 'is_admin' => 1 ), $atts );  
    
    $is_admin = (int)$atts['is_admin'];    
   
?>
    <div class="wrap" id="register_user" style="width: <?php echo ($is_admin)?'700px':'auto'; ?>;">        
        <?php echo ($is_admin)?'<h2>'.esc_html($title).'</h2>':''; ?>
        <?php 
            
            if($_POST['SubmitRegistration']) {               
                include('db_query_user.php');               
            }
          $com_Code  = $_POST['CompanyCode'];    
          if(empty($com_Code)) $com_Code = generate_random_password(6, 2);  
        ?>
        <form action="<?php print $_SERVER['REQUEST_URI'];?>" method="post" name="frmRegister" id="frmRegister" style="margin-bottom: 30px;"> <!-- enctype="multipart/form-data" -->	
        <table width="100%" cellspacing="5" cellpadding="0" border="0">
        <tbody>
        <tr valign="top" width="100%"><td align="right" colspan="2"><i><font color="#bd0000">*</font> Indicates Required Information</i></td></tr>        
		<tr><td colspan="2" class="formheader1">Company Information</td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Company Name:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" class="required" value="<?php print $_POST['CompanyName'];?>" name="CompanyName" id="CompanyName">                
            </td></tr>        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Address 1:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" class="required" value="<?php print $_POST['Address'];?>" name="Address" id="Address">                
        	</td></tr>            
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Address 2:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" value="<?php print $_POST['CompanyAddress2'];?>" name="CompanyAddress2" id="CompanyAddress2">                
        	</td></tr>        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> City, State, Zip:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" class="required" value="<?php print $_POST['CompanyCityStateZip'];?>" name="CompanyCityStateZip" id="CompanyCityStateZip">                
        	</td></tr>		
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Phone:</label></td><td align="left" style="width:72%;">
        	        <input type="text" class="required" value="<?php print $_POST['CompanyPhone'];?>" name="CompanyPhone" id="CompanyPhone">                
            </td></tr>		
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Website:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" value="<?php print $_POST['Website'];?>" name="Website" id="Website">
        	</td></tr>		
        <tr valign="top" class="inputfield"><td align="right" style="vertical-align:top; width:28%;">
        <label style="line-height: normal;">
        Please briefly tell us what type of business you are or service you provide:</label></td><td align="left" style="width:72%;"> 
                <textarea id="BusinessDescription" name="BusinessDescription" rows="10"><?php print $_POST['BusinessDescription']; ?></textarea>
            </td></tr>
        
        <tr valign="top" class="inputfield">
        	<td align="right" style="width:28%;"></td>
        	<td align="left" style="width:72%;vertical-align:top;">
            	I am interested in the following advertising opportunities (check all that apply):<br  clear="all">
            	
            		<input style="float: none"  type="checkbox" name="OnlineAdvertising" value="1" <?php print ($_REQUEST['OnlineAdvertising']==1?'checked=true':'');?>>
                 Online Advertising<br clear="all">
                
            		<input style="float: none"  type="checkbox" name="CitywidePlannerWorkbook" value="1" <?php print ($_REQUEST['CitywidePlannerWorkbook']==1?'checked=true':'');?>>
                 Citywide Planner Workbook<br clear="all">
                
            		<input style="float: none"  type="checkbox" name="VisitSanDiegoGuide" value="1" <?php print ($_REQUEST['VisitSanDiegoGuide']==1?'checked=true':'');?>>
                    Visit San Diego Guide<br clear="all">
            		<input style="float: none"  type="checkbox" name="LobbyAdvertising" value="1" <?php print ($_REQUEST['LobbyAdvertising']==1?'checked=true':'');?>>
                 Lobby Advertising
            </td>
        </tr>
       <tr><td colspan="2" class="formheader1">Contact Information</td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font>First Name:</label></td><td align="left" style="width:72%;"><input type="text" class="required" value="<?php print $_POST['ContactFirstName'];?>" name="ContactFirstName" id="ContactFirstName"></td></tr>
        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font>Last Name:</label></td><td align="left" style="width:72%;"><input type="text" class="required" value="<?php print $_POST['ContactLastName'];?>" name="ContactLastName" id="ContactLastName"></td></tr>
        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Address 1:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $_POST['Address1'];?>" name="Address1" id="Address1"></td></tr>

        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Address 2:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $_POST['Address2'];?>" name="Address2" id="Address2"></td></tr>        
        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>City, State, Zip code:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $_POST['CityStateZip'];?>" name="CityStateZip" id="CityStateZip"></td></tr>        
        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Phone:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $_POST['ContactPhone'];?>" name="ContactPhone" id="ContactPhone"></td></tr>        
		
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Fax:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $_POST['Fax'];?>" name="Fax" id="Fax"></td></tr>        
        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Email (Username):</label></td><td align="left" style="width:72%;"><input type="text" class="required disableAutoComplete" value="<?php print $_POST['Email'];?>" name="Email" id="Email" autocomplete="off"></td></tr>        
        
        <tr><td colspan="2" class="formheader1">Account Information</td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Create a Password:</label></td><td align="left" style="width:72%;"><input type="password" class="required disableAutoComplete" value="" name="Password" id="Password" autocomplete="off"></td></tr>
        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Verify Password:</label></td><td align="left" style="width:72%;"><input type="password" class="required validate-password disableAutoComplete" value="" name="VerifyPassword" id="VerifyPassword" autocomplete="off"><div class="errMsg" id="password-E"></div></td></tr>
        
        <tr valign="top" class="inputfield">
        	<td align="right"></td>
        	<td align="left">
            	Note: Please remember your password as you will use your email address and password to login to the business partners portion of the site
            </td>
        </tr>        
        <tr valign="top" class="inputfield"><td align="right" style="vertical-align:top;width:28%;"><label>Questions/Comments:</label></td><td align="left" style="width:72%;"><textarea cols="50" rows="10" name="Comments" id="Comments"><?php print $_POST['Comments'];?></textarea></td></tr>
        
        <tr valign="top" class="inputfield"></tr>
        <tr valign="top" width="100%"><td valign="top" align="left" colspan="2">
			<strong>
                <u>Terms and Conditions:</u>
			<br>
			SDCCC shall have the right to disapprove any content it, in its sole discretion, deems inappropriate or otherwise unacceptable. 
			</strong>
		</td></tr>
        
        <tr valign="top" width="100%"><td valign="top" align="right" colspan="2">
            <input id="hdUserID" name="hdUserID" value="<?php print $user_id; ?>" type="hidden">
            <input type="hidden" value="<?php print $com_Code;?>" name="CompanyCode" id="CompanyCode">
			<input type="button" id="ResetRegistration" name="ResetRegistration" value="Reset" class="button">&nbsp;&nbsp;<input class="button" type="submit" id="SubmitRegistration" name="SubmitRegistration" value="Submit">
            
		</td></tr>
        
    </tbody></table>
    </form>
    </div>
<?php 
} 

add_shortcode('accm_register_user', 'accm_Create_User');

function login_form(){ 
    
    global $current_user, $error_;  
    get_currentuserinfo();
    error_($error_);
    
    if( $current_user->ID<=0 ) {
    ?>
    <form action="" method="post" id="frmLogin" name="frLogin">
        <table width="100%" cellspacing="5" cellpadding="0" border="0">
            <tbody>
                <tr valign="top" width="100%"><td align="right" colspan="2"><i>* Indicates Required Information</i></td></tr>
        		<tr><td colspan="2" class="formheader1">Login</td></tr>
        		<tr valign="top" class="inputfield"><td align="right"><label class="prefield" id="lblemail" for="Email"><font style="color:#C00">*</font> Email Address:</label></td><td align="left"><input type="text" name="log" id="log" value="<?php echo $_POST['log']; ?>" size="20" /></td></tr>        		
        		<tr valign="top" class="inputfield"><td align="right"><label class="prefield" id="lblpassword" for="password"><font style="color:#C00">*</font> Password:</label></td><td align="left"><input type="password" name="pwd" id="pwd" size="20" /></td></tr>
        		<tr valign="top" width="100%"><td height="1" colspan="2" class="formfieldseparator1">&nbsp;</td></tr>                                
        		<tr valign="top"><td width="25%" align="right">Terms &amp; Conditions:</td><td width="100%" align="left">
                SDCCC shall have the right to disapprove any content it, in its sole discretion, deems inappropriate or otherwise unacceptable. 
                </td>
        		</tr>                                
        		<tr valign="top" width="100%"><td height="1" colspan="2" class="formfieldseparator2">&nbsp;</td></tr>
        		<tr valign="top"><td></td><td>
        			<table width="100%" cellspacing="0" cellpadding="0" border="0">
        			<tbody><tr><td valign="top" align="left">
                     <label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
                     <input type="submit" value="Login" id="btn_login" name="btn_login" class="button" />
                     <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
                    </td>
        			<td align="right"><a href="/businesspartners/register/">Register</a> | <a href="/businesspartners/forgot-password/">Forgot Password?</a></td></tr></tbody></table></td>
        		</tr>
        	</tbody>
         </table>
    </form>
<?php     
    } else {       
        wp_redirect_to('/businesspartners/account-information/',0);
        exit;
    }
}

add_shortcode('accm_login_form', 'login_form');


function forgot_password(){   
    global $user_ID;    
    
    if( $_POST['btnResetPassword'] ) {         
    
        $new_pass = generate_random_password(8);
        $user_id = username_exists($_POST['user_email']);
        
        if($user_id >0 ) {
            wp_set_password( $new_pass, $user_id);
            send_mail_password( $_POST['user_email'], $new_pass);
    
            error_('New password has been sent to your email!','confirm'); 
            return;
               
        }  else {
            error_('ERROR: There is no user registered with that email address.','confirm');
        }    
    }
    
    if($user_ID > 0 ) {
        wp_redirect_to('/businesspartners/');
    } else {
    ?>
    <div id="forgot_password">
    	Please enter your username or email address. You will receive a link to create a new password via email.
        <form method="post" action="" id="lostpasswordform" name="lostpasswordform">        	
        	Username or E-mail: <input type="text" tabindex="10" size="40" value="<?php print $_POST['user_email'];?>" class="input" id="user_email" name="user_email">
        	<input type="hidden" value="<?php echo $_SERVER['REQUEST_URI']; ?>?checkemail=confirm" name="redirect_to"><br />
        	<input type="submit" tabindex="100" value="Get New Password" class="button" id="btnResetPassword" name="btnResetPassword">
        </form>
    </div>
<?php } //end if
}

add_shortcode('accm_forgot_password', 'forgot_password');

//account infomation
function account_info(){
    global $wpdb, $user_ID, $msg;
    
    global $current_user;
    get_currentuserinfo();
        
    //confirm code to active account
    if($_POST['btnSubmitSendCode']) {       
        $code = sha1($_POST['Verify_Code']);
        if($current_user->user_activation_key!=$code) {
            print 'Invalid verification code. <a href="/businesspartners/account-information/?resend=true">Re-send Verification Code</a>';
            return;
        }else{
            $sql = "UPDATE ".$wpdb->prefix."users SET user_activation_key = '1'                               
                                    WHERE ID =".$current_user->ID;    
            $wpdb->query($sql);
            error_('You have successfully verified your login account. Click <a href="/businesspartners/account-information">here</a> to continue.','confirm');
            return;
        }
    }   
    //if not verification code
    if($current_user->ID > 0 ){
        if($_GET['resend']==true){
            $code = generate_random_password(10,true);
            $sql = "UPDATE ".$wpdb->prefix."users SET 
                                    user_activation_key = '".sha1($code)."'                               
                                    WHERE ID =".$current_user->ID;    
            $wpdb->query($sql);
            
            if(send_code_active( $code,$current_user->user_email))
                error_('Verification code has been sent to your email. Please check your email!','confirm');
            else
                error_('Error send mail','confirm');
            //wp_redirect_to('/businesspartners/account-information/', 3); 
            return;
        }else    
        if($current_user->user_activation_key!=1) {
            verification_code_form();
            return;
        }
    }
    if($current_user->ID <= 0 ){              
        wp_redirect_to('/businesspartners/');
        exit;
    } /*if($current_user->ID > 0 && $current_user->user_status < 2){
        error_('Your account is waiting for approval');
    }*/
    else { 
        
        if($_POST['btnSaveCompany'] || $_POST['btnSaveContact'] || $_POST['btnResetPass'] ) {               
            include('db_query_user.php');               
        }
        
            /*$sql = "SELECT com.*, con.id as con_ID,con.first_name, con.last_name, con.address1 as con_address1, con.address2 as con_address2,
                        con.city_state_zip as con_city_state_zip, con.phone as con_phone, con.fax,  
                        con.questions, con.email as con_email, u.user_login as user_email                        
                    FROM ".$wpdb->prefix."company com 
                    LEFT JOIN ".$wpdb->prefix."contact con ON com.user_id = con.user_id
                    INNER JOIN ".$wpdb->prefix."users u ON u.ID = com.user_id 
                    WHERE u.ID = ".$current_user->ID;                   
            $wpdb->get_row($sql);*/
            $row = account_company_from_UID($user_ID); 
            if($row->approved!=1){
                error_('Your account is waiting for approval','confirm');
            }
            
            $com_ID           = $row->id;
            $com_Name           = stripcslashes($row->name);
            $com_Address        = stripcslashes($row->address1);
            $com_Address2       = stripcslashes($row->address2);
            $com_CityStateZip   = stripcslashes($row->city_state_zip);
            $com_Phone          = stripcslashes($row->phone);
            $com_Website        = stripcslashes($row->website);
            $com_BusinessDescription        = stripcslashes($row->business_description);
            $com_OnlineAdvertising          = stripcslashes($row->online_advertising);
            $com_CitywidePlannerWorkbook    = stripcslashes($row->citywide_planner);
            $com_VisitSanDiegoGuide         = stripcslashes($row->visit_sdg);
            $com_LobbyAdvertising           = stripcslashes($row->lobby_advertising);
            $com_Code                       = stripcslashes($row->company_code);
           
            //contact 
            $con_ID        = $row->con_ID;
            $con_FirstName = stripcslashes($row->first_name);
            $con_LastName  = stripcslashes($row->last_name);
            $con_Address1  = stripcslashes($row->con_address1);
            $con_Address2  = stripcslashes($row->con_address2);
            $con_CityStateZip = stripcslashes($row->con_city_state_zip);
            $con_Phone        = stripcslashes($row->con_phone);
            $con_Fax          = stripcslashes($row->fax);
            $con_Email        = $row->con_email;
            $con_Comments        = stripcslashes($row->questions); 
            $user_email = $row->user_email;
            
        ?>
    <form action="" method="post" name="frmRegister" id="frmRegister">	
        <table width="100%" cellspacing="5" cellpadding="0" border="0">
        <tbody>        
        <tr valign="top" width="100%"><td align="right" colspan="2"><i><font color="#bd0000">*</font> Indicates Required Information</i></td></tr>        
		<tr><td colspan="2" class="formheader1">Company Information</td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Company Name:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" class="required" value="<?php print $com_Name;?>" name="CompanyName" id="CompanyName">                
            </td></tr>        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Address 1:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" class="required" value="<?php print $com_Address;?>" name="Address" id="Address">                
        	</td></tr>            
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Address 2:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" value="<?php print $com_Address2;?>" name="CompanyAddress2" id="CompanyAddress2">                
        	</td></tr>        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> City, State, Zip:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" class="required" value="<?php print $com_CityStateZip;?>" name="CompanyCityStateZip" id="CompanyCityStateZip">                
        	</td></tr>		
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Phone:</label></td><td align="left" style="width:72%;">
        	                	<input type="text" class="required" value="<?php print $com_Phone;?>" name="CompanyPhone" id="CompanyPhone">                
            </td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Website:</label></td><td align="left" style="width:72%;">        	
                	<input type="text" value="<?php print $com_Website;?>" name="Website" id="Website">
        	</td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="vertical-align:top;width:28%;"><label><font color="#bd0000">*</font>
        Please briefly tell us what type of business you are or service you provide:</label></td><td align="left" style="width:72%;"> 
        <textarea id="BusinessDescription" name="BusinessDescription" rows="10"><?php print $com_BusinessDescription; ?></textarea> 
        </td></tr>        
        <tr valign="top" class="inputfield">
        	<td align="right" style="width:28%;"></td>
        	<td align="left" style="width:72%;vertical-align:top;">
            	I am interested in the following advertising opportunities (check all that apply):<br>            	
            		<input style="float: none" type="checkbox" name="OnlineAdvertising" value="1" <?php print ($com_OnlineAdvertising==1?'checked=true':'');?>>&nbsp;&nbsp;Online Advertising<br />                
            		<input style="float: none" type="checkbox" name="CitywidePlannerWorkbook" value="1" <?php print ($com_CitywidePlannerWorkbook==1?'checked=true':'');?>>&nbsp;&nbsp;Citywide Planner Workbook<br />                
            		<input style="float: none" type="checkbox" name="VisitSanDiegoGuide" value="1" <?php print ($com_VisitSanDiegoGuide==1?'checked=true':'');?>>&nbsp;&nbsp;Visit San Diego Guide<br />              
            		<input style="float: none" type="checkbox" name="LobbyAdvertising" value="1" <?php print ($com_LobbyAdvertising==1?'checked=true':'');?>>&nbsp;&nbsp;Lobby Advertising
            </td>
        </tr>
        <tr valign="top" class="inputfield">
            <td align="right" style="width:28%;"><label>Company Code:</label></td>
            <td align="left" style="width:72%;">  <?php print $com_Code;?>      	                 
            </td>
        </tr>
        <tr valign="top" class="inputfield">
        	<td align="right" style="width:28%;"></td>
            <td align="right"> <input type="hidden" id="hidComID" name="hidComID" value="<?php print $com_ID; ?>" />
                <input class="button"  type="submit" value="Save Change" id="btnSaveCompany" name="btnSaveCompany" />
            </td>
        </tr>
        <tr><td colspan="2" class="formheader1">Contact Information</td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Contact First Name:</label></td><td align="left" style="width:72%;"><input type="text" class="required" value="<?php print $con_FirstName;?>" name="ContactFirstName" id="ContactFirstName"></td></tr>        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Contact Last Name:</label></td><td align="left" style="width:72%;"><input type="text" class="required" value="<?php print $con_LastName;?>" name="ContactLastName" id="ContactLastName"></td></tr>        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Address 1:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $con_Address1;?>" name="Address1" id="Address1"></td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Address 2:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $con_Address2;?>" name="Address2" id="Address2"></td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>City, State, Zip code:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $con_CityStateZip;?>" name="CityStateZip" id="CityStateZip"></td></tr>        
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Phone:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $con_Phone;?>" name="ContactPhone" id="ContactPhone"></td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label>Fax:</label></td><td align="left" style="width:72%;"><input type="text" value="<?php print $con_Fax;?>" name="Fax" id="Fax"></td></tr>
        <tr valign="top" class="inputfield"><td align="right" style="width:28%;"><label><font color="#bd0000">*</font> Email: <br />(Username)</label></td><td align="left" style="width:72%;"><input type="text" class="required disableAutoComplete" value="<?php print $con_Email;?>" name="Email" id="Email" autocomplete="off"></td></tr>      
        <tr valign="top" class="inputfield"><td align="right" style="vertical-align:top;width:28%;"><label>Questions or Comments:</label></td><td align="left" style="width:72%;"><textarea cols="50" rows="10" name="Comments" id="Comments"><?php print $con_Comments;?></textarea></td></tr>
        <tr valign="top" class="inputfield">
        	<td align="right" style="width:28%;"></td>
            <td align="right"> <input type="hidden" id="hidConID" name="hidConID" value="<?php print $con_ID; ?>" />
                <input class="button" type="submit" value="Save Change" id="btnSaveContact" name="btnSaveContact" />
            </td>
        </tr>
        <tr><td colspan="2" class="formheader1">Account Information</td></tr>
        <tr valign="top" class="inputfield">
        	<td align="right"><label>Email:</label></td>
        	<td align="left">
            	<label><?php print $current_user->user_email; ?></label>
            </td>
        </tr>        
        <tr valign="top" class="inputfield">
        	<td align="right"><label><font color="#bd0000">*</font> New Password:</label></td>
        	<td align="left">
            	<input type="password" name="new_password" id="new_password" size="20" />
            </td>
        </tr> 
        <tr valign="top" class="inputfield">
        	<td align="right"><label><font color="#bd0000">*</font> Verify New Password:</label></td>
        	<td align="left">
            	<input type="password" name="new_password1" id="new_password1" size="20" />
            </td>
        </tr> 
        <tr valign="top" width="100%"><td valign="top" align="right" colspan="2">            
			<input type="submit" id="btnResetPass" name="btnResetPass" value="Reset Password"  class="button">
        </td></tr>        
    </tbody></table>   
    </form><br />&nbsp;<br />
 <?php   }
}

add_shortcode('accm_account_info', 'account_info'); 


function verification_code_form(){ ?>
    Before you continue, please enter the verification code that you recieved thru email.<br />
    <em>Note: Please also check your Spam/Bulk mail folder.</em>
    <form action="" method="post" name="frmRegister" id="frmRegister">	
        <table width="100%" cellspacing="5" cellpadding="0" border="0">
            <tr>
            	<td valign="top" align="left" colspan="2"> &nbsp;</td>
            </tr>
            <tr valign="top" width="100%"><td align="right" colspan="2"><i><font color="#bd0000">*</font> Indicates Required Information</i></td></tr>        
    		<tr><td colspan="2" class="formheader1"  style="line-height: 24px;">Verify account</td></tr>
            <tr valign="top" class="inputfield">
            	<td align="right"  style="line-height: 24px;"><font color="#bd0000">*</font>Enter Verification Code:</td>
            	<td align="left" style="line-height: 24px;">
                	<input type="text" style="width: 150px;" value="" name="Verify_Code" id="Verify_Code">&nbsp;(<a href="/businesspartners/account-information/?resend=true">Re-send Verifycation Code</a>) 
                </td>
            </tr>   
            <tr valign="top" width="100%">
                <td align="right"  style="line-height: 24px;"></td>
                <td valign="top" align="left">            
    			 <input type="submit" id="btnSubmitSendCode" name="btnSubmitSendCode" value="Submit"  class="button">
                </td></tr>       
        </table>
   </form>
<?php } ?>